package com.xxl.controller;

import com.xxl.dto.User;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.util.List;

/**
 * controller api
 * @author xxl
 * @date 2023/3/18
 */
@Tag(name = "UserControllerApi接口",description = "用户的操作")
public interface UserControllerApi {
    //如全局的异常类捕捉了400的错误就会加入所有方法中，然后会被记录在swagger-ui
   @ApiResponse(description = "登录成功",content = @Content(mediaType = "application/json;charset=utf-8"),responseCode = "200")
   @ApiResponse(description = "页面未找到",content = @Content(mediaType = "application/json;charset=utf-8"),responseCode = "404")
   @ApiResponse(description = "服务器代码错误",content = @Content(mediaType = "application/json;charset=utf-8"),responseCode = "500")
   @Parameter(name = "username",description = "用户名",required = false)
   @Parameter(name = "password",description = "用户密码",required = false)
   String login(String username,String password);
    List<User> queryAllUser();
}
